with open('file.txt', 'w') as f:
    for i in range(10000000):
        f.write(str(i) + ' Hello, world!' + '\n')
